	<div class="Main_Right" >
		<div class="Main_Right_Top"><span></span></div>
		<div class="Main_Right_Content" id="Main_Right_Content">
			  <div class="Main_Right_Title">当前位置：学校管理 --> 编辑学校  </div>
              <!-- Main_information begin -->
			  <div class="Main_handleBar check_pass" id="Main_handleBar" style="display: none"   >
					<div class="Main_handleBar_head"></div>
					<div class="Main_handleBar_body">
						<p></p>
					</div>
			  </div>
			  <form name="thisForm"  id="thisForm" method="post" action="${base}/school/edit.action" >
				<input type=hidden name="school.id" value=${(school.id)!0}>
				<input type=hidden name="school.majors" value=${(school.majors)!',0,'}>
				<input type=hidden name=isAdmin value=>
			   <div class="Main_Right_ListTable">
					<div class="Main_Right_SearchTable_Title">
						<span class="Main_Right_SearchTable_Title_Left"></span>
						学校基本信息
						<span class="Main_Right_SearchTable_Title_Right"></span>
					</div>
		  			<div class="Main_Right_SearchTable_Bottom2"  style="text-align:left;padding-left:5px;border-buttom:1px solid #000;">
						<div  role="button" tabindex="0" class="js-component-button nui-mainBtn nui-btn ">
							<span class="nui-btn-text" onclick="toSubmit();"  >保存</span>
						</div>
						<div  role="button" tabindex="0" class="js-component-button nui-mainBtn nui-btn ">
							<span class="nui-btn-text" onclick="goBack('${base}/school/list.action')" >返回</span>
						</div>
		 			</div>
					<div class="Main_Right_p"  style="padding-left:10px">
						<table border="0" cellspacing="0" cellpadding="0"  width="100%" class="newTable">
							<tr>
								<td class="title"  width="8%">学校名称：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="schoolName" name="school.schoolName" value="${(school.schoolName)!''}"/>
								</td>			
								<td class="title"  width="8%">所在州：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="state" name="school.state" value="${(school.state)!''}"/>
								</td>
								<td class="title"  width="8%">所在城市：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="city" name="school.city" value="${(school.city)!''}"/>
								</td>
							</tr>			
							<tr>
								<td class="title"  width="8%">学校地址：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="address" name="school.address" value="${(school.address)!''}"/>
								</td>			
								<td class="title"  width="8%">网址：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="webSite" name="school.webSite" value="${(school.webSite)!''}"/>
								</td>
								<td class="title"  width="8%">电话：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="contactPhone" name="school.contactPhone" value="${(school.contactPhone)!''}"/>
								</td>
							</tr>			
							<tr>
								<td class="title"  width="8%">招生办邮件：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="admissionOfficeEmail" name="school.admissionOfficeEmail" value="${(school.admissionOfficeEmail)!''}"/>
								</td>			
								<td class="title"  width="8%">全球排名：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="ranking1" name="school.ranking1" value="${(school.ranking1)!''}"/>
								</td>
								<td class="title"  width="8%">国内排名：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="ranking2" name="school.ranking2" value="${(school.ranking2)!''}"/>
								</td>
							</tr>			
							<tr>
								<td class="title"  width="8%">授课语言：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="teachLanguage" name="school.teachLanguage" value="${(school.teachLanguage)!''}"/>
								</td>			
								<td class="title"  width="8%">建校时间：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="foundedTime" name="school.foundedTime" value="${(school.foundedTime)!''}"/>
								</td>
								<td class="title"  width="8%">学校类型：</td>
								<td class="content"  width="14%">
								    <@baseMacro.schoolTypeSelect 'schoolType' 'school.schoolType' school.schoolType!-1 true/>
								</td>
							</tr>			
							<tr>
								<td class="title"  width="8%">学制：</td>
								<td class="content"  width="14%">
								    <@baseMacro.schoolTermsSelect 'academicTerms' 'school.academicTerms' school.academicTerms!-1 true/>
								</td>			
								<td class="title"  width="8%">学位：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="degrees" name="school.degrees" value="${(school.degrees)!''}"/>
								</td>
								<td class="title"  width="8%">学生人数：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="numberOfStudents" name="school.numberOfStudents" value="${(school.numberOfStudents)!''}"/>
								</td>
							</tr>			
							<tr>
								<td class="title"  width="8%">国际生人数：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="numberOfInternationalStudents" name="school.numberOfInternationalStudents" value="${(school.numberOfInternationalStudents)!''}"/>
								</td>			
								<td class="title"  width="8%">中国留学生人数：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="numberOfChineseStudents" name="school.numberOfChineseStudents" value="${(school.numberOfChineseStudents)!''}"/>
								</td>
								<td class="title"  width="8%">师生比例：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="teacherToStudentRatio" name="school.teacherToStudentRatio" value="${(school.teacherToStudentRatio)!''}"/>
								    %
								</td>
							</tr>			
							<tr>
								<td class="title"  width="8%">本科研究生比例：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="undergraduatesToGraduatesRatio" name="school.undergraduatesToGraduatesRatio" value="${(school.undergraduatesToGraduatesRatio)!''}"/>
								    %
								</td>			
								<td class="title"  width="8%">热门专业和相应人数比例：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="popularMajors" name="school.popularMajors" value="${(school.popularMajors)!''}"/>
								    %
								</td>
								<td class="title"  width="8%">男女学生比例：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="maleToFemaleRatio" name="school.maleToFemaleRatio" value="${(school.maleToFemaleRatio)!''}"/>
								    %
								</td>
							</tr>			
							<tr>
								<td class="title"  width="8%">本州和外州学生比例：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="instateToOutstateRatio" name="school.instateToOutstateRatio" value="${(school.instateToOutstateRatio)!''}"/>
								    %
								</td>			
								<td class="title"  width="8%">族裔学生比例：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="raceRatio" name="school.raceRatio" value="${(school.raceRatio)!''}"/>
								    %
								</td>
								<td class="title"  width="8%">留学生比例：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="internationalStudentRatio" name="school.internationalStudentRatio" value="${(school.internationalStudentRatio)!''}"/>
								    %
								</td>
							</tr>			
							<tr>
								<td class="title"  width="8%">获得自助的学生比例：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="grantedRatio" name="school.grantedRatio" value="${(school.grantedRatio)!''}"/>
								    %
								</td>			
								<td class="title"  width="8%">获得自助的国际学生比例：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="internationalStudentGrantedRratio" name="school.internationalStudentGrantedRratio" value="${(school.internationalStudentGrantedRratio)!''}"/>
								    %
								</td>
								<td class="title"  width="8%">录取率：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="admissionRatio" name="school.admissionRatio" value="${(school.admissionRatio)!''}"/>
									%
								</td>
							</tr>			
							<tr>
								<td class="title"  width="8%">秋季申请截止日：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="fallDeadline" name="school.fallDeadline" value="${(school.fallDeadline)!''}"/>
								</td>			
								<td class="title"  width="8%">提前录取申请截止日：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="earlyDecisionDeadline" name="school.earlyDecisionDeadline" value="${(school.earlyDecisionDeadline)!''}"/>
								</td>
								<td class="title"  width="8%">提前录取回复日：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="earlyDecisionReplyDeadline" name="school.earlyDecisionReplyDeadline" value="${(school.earlyDecisionReplyDeadline)!''}"/>
								</td>
							</tr>			
							<tr>
								<td class="title"  width="8%">国际生申请截止日：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="internationalApplicationDeadline" name="school.internationalApplicationDeadline" value="${(school.internationalApplicationDeadline)!''}"/>
								</td>			
								<td class="title"  width="8%">奖学金截止日：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="scholarshipDeadline" name="school.scholarshipDeadline" value="${(school.scholarshipDeadline)!''}"/>
								</td>
								<td class="title"  width="8%">分校：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="campuses" name="school.campuses" value="${(school.campuses)!''}"/>
								</td>
							</tr>			
							<tr>
								<td class="title"  width="8%">申请费：(人民币/元)</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="applicationFee" name="school.applicationFee" value="${(school.applicationFee)!''}"/>
								</td>
								<td class="title"  width="8%">每年学费：(人民币/元)</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="tuition" name="school.tuition" value="${(school.tuition)!''}"/>
								</td>
								<td class="title"  width="8%">食宿费：(人民币/元)</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="roomBoard" name="school.roomBoard" value="${(school.roomBoard)!''}"/>
								</td>			
							</tr>			
							<tr>
								<td class="title"  width="8%">SAT代码：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="satCode" name="school.satCode" value="${(school.satCode)!''}"/>
								</td>
								<td class="title"  width="8%">TOEFL代码：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="toeflCode" name="school.toeflCode" value="${(school.toeflCode)!''}"/>
								</td>			
								<td class="title"  width="8%">GRE代码：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="greCode" name="school.greCode" value="${(school.greCode)!''}"/>
								</td>
							</tr>			
							<tr>
								<td class="title"  width="8%">国际生最低TOEFL书面成绩：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="lowestRequiredToeflPaperScore" name="school.lowestRequiredToeflPaperScore" value="${(school.lowestRequiredToeflPaperScore)!''}"/>
								</td>			
								<td class="title"  width="8%">国际生最低TOEFL机考成绩：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="lowestRequiredToeflMachineScore" name="school.lowestRequiredToeflMachineScore" value="${(school.lowestRequiredToeflMachineScore)!''}"/>
								</td>
								<td class="title"  width="8%">录取的平均GPA：</td>
								<td class="content"  width="14%">
									<input type="text" class="addtext" id="averageGpaAdmitted" name="school.averageGpaAdmitted" value="${(school.averageGpaAdmitted)!''}"/>
								</td>
							</tr>			
							<tr>
								<td class="title"  width="8%">学校环境：</td>
								<td class="content"  width="14%" colspan='5' style='padding:5px;'>
								    <textarea id='schoolEnvironment' name='school.schoolEnvironment' rows='6' cols='105'>${(school.schoolEnvironment)!''}</textarea>
								</td>			
							</tr>			
							<tr>
								<td class="title"  width="8%">学校历史：</td>
								<td class="content"  width="14%" colspan='5' style='padding:5px;'>
								    <textarea id='schoolHistory' name='school.schoolHistory' rows='6' cols='105'>${(school.schoolHistory)!''}</textarea>
								</td>			
							</tr>			
						</table>
					</div>
		  			<div class="Main_Right_SearchTable_Bottom2"  style="text-align:center;">
						<div  role="button" tabindex="0" class="js-component-button nui-mainBtn nui-btn ">
							<span class="nui-btn-text" onclick="toSubmit();"  >保存</span>
						</div>
						<div  role="button" tabindex="0" class="js-component-button nui-mainBtn nui-btn ">
							<span class="nui-btn-text" onclick="goBack('${base}/school/list.action')" >返回</span>
						</div>
		 			 </div>
			    </div>
				</form>
		 </div>
	 </div>
	 <script> 
jQuery(document).ready(function($){
		$("table").find("td").removeClass("title");
		$("table").find("td").removeClass("content1");
		$("table").find("th").addClass("nui-table-cell");
		$("table").find("td").addClass("nui-table-cell2");
		$("table").find("input").attr("size","25");
	 	$( "#fallDeadline" ).datepicker();
		$( "#fallDeadline" ).datepicker( "option", "dateFormat",'yy-mm-dd' );	
	 	$( "#earlyDecisionDeadline" ).datepicker();
		$( "#earlyDecisionDeadline" ).datepicker( "option", "dateFormat",'yy-mm-dd' );			
	 	$( "#earlyDecisionReplyDeadline" ).datepicker();
		$( "#earlyDecisionReplyDeadline" ).datepicker( "option", "dateFormat",'yy-mm-dd' );			
	 	$( "#internationalApplicationDeadline" ).datepicker();
		$( "#internationalApplicationDeadline" ).datepicker( "option", "dateFormat",'yy-mm-dd' );			
	 	$( "#scholarshipDeadline" ).datepicker();
		$( "#scholarshipDeadline" ).datepicker( "option", "dateFormat",'yy-mm-dd' );			
	 	$( "#foundedTime" ).datepicker();
		$( "#foundedTime" ).datepicker( "option", "dateFormat",'yy-mm-dd' );			
});			
function toSubmit(){
		 var form=document.getElementById("thisForm");
	     if(jQuery("#thisForm").valid()){
			$('#thisForm').ajaxSubmit(function(data){
                loadNewContent('${base}/school/list.action');
            });     		
		}
}  
//表单验证
jQuery(document).ready(function() {
		 // 电话号码验证       
		 jQuery.validator.addMethod("isTel", function(value, element) {       
			 var tel = /^\d{3,4}-?\d{7,9}$/;    
			 return this.optional(element) || (tel.test(value)); 
		 }, "请正确填写电话号码");  
		 // 非负整数验证       
		 jQuery.validator.addMethod("isNumber", function(value, element) {       
			 var tel = /^\d+$/;    
			 return this.optional(element) || (tel.test(value)); 
		 }, "请填写整数");  
		var validator = jQuery("#thisForm").validate({
			errorElement: "em",   
			errorPlacement: function(error, element) {
				error.appendTo( element.parent("td") );  
			},
			rules: {  
				'school.schoolName': { 
					required:true,
					maxlength:250
				},
				'school.webSite': { 
					url:true
				},
				'school.contactPhone': { 
					isTel:true
				},
				'school.admissionOfficeEmail': { 
					email:true
				},
				'school.numberOfStudents': { 
					isNumber:true
				},
				'school.numberOfInternationalStudents': { 
					isNumber:true
				},
				'school.numberOfChineseStudents': { 
					isNumber:true
				},
				'school.teacherToStudentRatio': { 
					number:true
				},
				'school.undergraduatesToGraduatesRatio': { 
					number:true
				},
				'school.popularMajors': { 
					number:true
				},
				'school.maleToFemaleRatio': { 
					number:true
				},
				'school.instateToOutstateRatio': { 
					number:true
				},
				'school.raceRatio': { 
					number:true
				},
				'school.internationalStudentRatio': { 
					number:true
				},
				'school.grantedRatio': { 
					number:true
				},
				'school.internationalStudentGrantedRratio': { 
					number:true
				},
				'school.tuition': { 
					number:true
				},
				'school.roomBoard': { 
					number:true
				},
				'school.applicationFee': { 
					number:true
				},
				'school.admissionRatio': { 
					number:true
				},
				'school.lowestRequiredToeflPaperScore': { 
					number:true
				},
				'school.lowestRequiredToeflMachineScore': { 
					number:true
				},
				'school.averageGpaAdmitted': { 
					number:true
				},
				'school.ranking1': { 
					isNumber:true
				},
				'school.ranking2': { 
					isNumber:true
				}
			},
			messages: { 
				'school.schoolName': {
					required: '必填',
					maxlength: '最多输入250个字符'
				},
				'school.webSite': {
					url: '请输入合法网址'
				},
				'school.admissionOfficeEmail': { 
					email:'请输入合法邮箱'
				}
			}
		});
	});
</script>